package com.teamwings.util;

import java.util.Scanner;

public class FormatTable {

    /**
     * 快速创建添加字段注释器  开启  把  就数据库的建表语句 复制到 控制台 即可
     * @param args
     */
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        StringBuilder s = new StringBuilder();
        String tableName = null;
        String tableNamePS = null;
        String colum = null;
        String columPS = null;
        //前一个字符串
        String proStr = null;

        while (true) {
            String str = input.next();

            if ("TABLE".equals(proStr)) {
                tableName = str.replaceAll("`","\"").toUpperCase();
            }
            if (str.contains("`") && tableName != null){
                colum = str.replaceAll("`","\"").toUpperCase();
            }
            if ("COMMENT".equals(proStr)){
                columPS = str.substring(0,str.length()-1);
                System.out.println("comment on column OA." + tableName + "." +colum+ " is " + columPS + ";");
            }
            proStr = str;
        }
    }


}
